package com.jml.service;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;


@RestController
public class MemberService {
    @Value("${server.port}")
    private String serverPort;

    /**
     * 会员服务提供的接口被订单服务调用
     */
    @GetMapping("/getUser")
    public String getUser(HttpServletRequest request) {
        String port = request.getHeader("serverPort");
        return "jmljmljmljml,member的端口号为:" + this.serverPort + "请求头中的内容："+port;
    }
}
